package com.newvpn.fastbest.zenith.dialog;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.view.View;
import android.widget.Button;

import com.newvpn.fastbest.zenith.BuildConfig;
import com.newvpn.fastbest.zenith.R;
import com.newvpn.fastbest.zenith.utils.VLog;


public class RateDialog extends BaseDialog {

    private Button ok;

    public RateDialog() {

    }

    public static RateDialog newInstance() {
        return new RateDialog();
    }


    @Override
    protected int layout() {
        return R.layout.v_dialog_rate;
    }

    @Override
    protected void init(View view) {
        view.findViewById(R.id.ivClose).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
        view.findViewById(R.id.llGo).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VLog.event("Rate_Click");
                Intent intent = new Intent(Intent.ACTION_VIEW);
                intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID));
                startActivity(intent);
                dismiss();
            }
        });

    }




}

